<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});




Route::group(['middleware' => ['web']], function(){
    Route::get('news', ['uses' => 'NewsController@News'])->name('news');
    Route::any('create', ['uses' => 'NewsController@create'])->name('create');
    Route::post('save', ['uses' => 'NewsController@save'])->name('save');
    Route::any('update/{id}', ['uses' => 'NewsController@update'])->name('update');
    Route::any('delete/{id}', ['uses' => 'NewsController@delete'])->name('delete');
    Route::any('detail/{id}', ['uses' => 'NewsController@detail'])->name('detail');
});


Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');
